<!DOCTYPE html>
<html> 
	<body> 
            <canvas id=myCanvas width=auto  height=145 style="border:1px solid #d3d3d3;"> 
            Your browser does not support the HTML5 canvas tag.
            </canvas>            
        </body>
 <script> 

    var dx = 0.97;
    var scale = 1.05;
    var x = 0;
    //var x1 = 0;
    var larg = 0;     
    var tamImg = 1606;
	var posicao = 0;
	var posicao2 = -1606;
    var canvas = document.getElementById('myCanvas');
    var ctx = document.getElementById('myCanvas').getContext('2d');
    var image = new Image();
    image.src = 'imagensFilmes.png';

		
function Draw_1(tamImg) {
	posicao = posicao+dx;
	if( posicao >= tamImg )
	{
			posicao = - tamImg +dx;
	}
    ctx.drawImage(image,posicao,0);	
}

function Draw_2(tamImg) {
	if(posicao2 >= tamImg)
	{
		posicao2 = -1606;
	}
	else{
		posicao2 = posicao2 + dx;
	}
	ctx.drawImage(image, posicao2,0);
}


function Clear() {
    ctx.rect(0, 0, ctx.canvas.width ,100);
}

function Begin() {
    larg = ctx.canvas.width=window.innerWidth;    

 return setInterval(Atualizar, 13);
}


function Atualizar() {

    Clear();    
    Draw_1(tamImg);
    Draw_2(tamImg); 
}

Begin();

</script> 

</html>

